3.375 \(\int \frac{\cot ^6(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=285 \[ \frac{b^{7/2} \left (99 a^2+44 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 f (a+b)^{11/2}}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 f (a+b)^3}+\frac{\left (32 a^2 b+8 a^3-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 f (a+b)^4}-\frac{\left (80 a^2 b^2+40 a^3 b+8 a^4-19 a b^3-4 b^4\right ) \cot (e+f x)}{8 a^2 f (a+b)^5}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 f (a+b)^2 \left (a+b \tan ^2(e+f x)+b\right )}-\frac{x}{a^3}-\frac{b \cot ^5(e+f x)}{4 a f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2} \]

[Out]

-(x/a^3) + (b^(7/2)*(99*a^2 + 44*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*(a + b)^(11/2
)*f) - ((8*a^4 + 40*a^3*b + 80*a^2*b^2 - 19*a*b^3 - 4*b^4)*Cot[e + f*x])/(8*a^2*(a + b)^5*f) + ((8*a^3 + 32*a^
2*b - 51*a*b^2 - 12*b^3)*Cot[e + f*x]^3)/(24*a^2*(a + b)^4*f) - ((8*a^2 - 75*a*b - 20*b^2)*Cot[e + f*x]^5)/(40
*a^2*(a + b)^3*f) - (b*Cot[e + f*x]^5)/(4*a*(a + b)*f*(a + b + b*Tan[e + f*x]^2)^2) - (b*(13*a + 4*b)*Cot[e +
f*x]^5)/(8*a^2*(a + b)^2*f*(a + b + b*Tan[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.60672, antiderivative size = 285, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {4141, 1975, 472, 579, 583, 522, 203, 205} \[ \frac{b^{7/2} \left (99 a^2+44 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 f (a+b)^{11/2}}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 f (a+b)^3}+\frac{\left (32 a^2 b+8 a^3-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 f (a+b)^4}-\frac{\left (80 a^2 b^2+40 a^3 b+8 a^4-19 a b^3-4 b^4\right ) \cot (e+f x)}{8 a^2 f (a+b)^5}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 f (a+b)^2 \left (a+b \tan ^2(e+f x)+b\right )}-\frac{x}{a^3}-\frac{b \cot ^5(e+f x)}{4 a f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-(x/a^3) + (b^(7/2)*(99*a^2 + 44*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*(a + b)^(11/2
)*f) - ((8*a^4 + 40*a^3*b + 80*a^2*b^2 - 19*a*b^3 - 4*b^4)*Cot[e + f*x])/(8*a^2*(a + b)^5*f) + ((8*a^3 + 32*a^
2*b - 51*a*b^2 - 12*b^3)*Cot[e + f*x]^3)/(24*a^2*(a + b)^4*f) - ((8*a^2 - 75*a*b - 20*b^2)*Cot[e + f*x]^5)/(40
*a^2*(a + b)^3*f) - (b*Cot[e + f*x]^5)/(4*a*(a + b)*f*(a + b + b*Tan[e + f*x]^2)^2) - (b*(13*a + 4*b)*Cot[e +
f*x]^5)/(8*a^2*(a + b)^2*f*(a + b + b*Tan[e + f*x]^2))

Rule 4141

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[((d*ff*x)^m*(a + b*(1 + ff^2*x^2)^(n/2))^p)/(1 + ff^
2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && IntegerQ[n/2] && (IntegerQ[m/2] ||
EqQ[n, 2])

Rule 1975

Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*ExpandToSum[u, x]^p*ExpandToSum[v, x]^q
, x] /; FreeQ[{e, m, p, q}, x] && BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0]
&&  !BinomialMatchQ[{u, v}, x]

Rule 472

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*(e*x
)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*e*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d)*(
p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n*(
p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p
, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 579

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> -Simp[((b*e - a*f)*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*g*n*(b*c - a*d)*(p +
1)), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)*(
m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cot ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^6 \left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^6 \left (1+x^2\right ) \left (a+b+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{\operatorname{Subst}\left (\int \frac{4 a-5 b-9 b x^2}{x^6 \left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a (a+b) f}\\ &=-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{8 a^2-75 a b-20 b^2-7 b (13 a+4 b) x^2}{x^6 \left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a+b)^2 f}\\ &=-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 (a+b)^3 f}-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{5 \left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right )+5 b \left (8 a^2-75 a b-20 b^2\right ) x^2}{x^4 \left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{40 a^2 (a+b)^3 f}\\ &=\frac{\left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^4 f}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 (a+b)^3 f}-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{15 \left (8 a^4+40 a^3 b+80 a^2 b^2-19 a b^3-4 b^4\right )+15 b \left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right ) x^2}{x^2 \left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{120 a^2 (a+b)^4 f}\\ &=-\frac{\left (8 a^4+40 a^3 b+80 a^2 b^2-19 a b^3-4 b^4\right ) \cot (e+f x)}{8 a^2 (a+b)^5 f}+\frac{\left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^4 f}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 (a+b)^3 f}-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{15 \left (8 a^5+48 a^4 b+120 a^3 b^2+160 a^2 b^3+21 a b^4+4 b^5\right )+15 b \left (8 a^4+40 a^3 b+80 a^2 b^2-19 a b^3-4 b^4\right ) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{120 a^2 (a+b)^5 f}\\ &=-\frac{\left (8 a^4+40 a^3 b+80 a^2 b^2-19 a b^3-4 b^4\right ) \cot (e+f x)}{8 a^2 (a+b)^5 f}+\frac{\left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^4 f}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 (a+b)^3 f}-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac{\left (b^4 \left (99 a^2+44 a b+8 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^3 (a+b)^5 f}\\ &=-\frac{x}{a^3}+\frac{b^{7/2} \left (99 a^2+44 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 (a+b)^{11/2} f}-\frac{\left (8 a^4+40 a^3 b+80 a^2 b^2-19 a b^3-4 b^4\right ) \cot (e+f x)}{8 a^2 (a+b)^5 f}+\frac{\left (8 a^3+32 a^2 b-51 a b^2-12 b^3\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^4 f}-\frac{\left (8 a^2-75 a b-20 b^2\right ) \cot ^5(e+f x)}{40 a^2 (a+b)^3 f}-\frac{b \cot ^5(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{b (13 a+4 b) \cot ^5(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [C]  time = 8.20968, size = 976, normalized size = 3.42 \[ \frac{\left (99 a^2+44 b a+8 b^2\right ) (\cos (2 e+2 f x) a+a+2 b)^3 \left (\frac{i b^4 \tan ^{-1}\left (\sec (f x) \left (\frac{\cos (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{i \sin (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right ) (-a \sin (f x)-2 b \sin (f x)+a \sin (2 e+f x))\right ) \sin (2 e)}{64 a^3 \sqrt{a+b} f \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{b^4 \tan ^{-1}\left (\sec (f x) \left (\frac{\cos (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{i \sin (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right ) (-a \sin (f x)-2 b \sin (f x)+a \sin (2 e+f x))\right ) \cos (2 e)}{64 a^3 \sqrt{a+b} f \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right ) \sec ^6(e+f x)}{(a+b)^5 \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \csc (e) \csc ^5(e+f x) \sin (f x) \sec ^6(e+f x)}{40 (a+b)^3 f \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \csc (e) \csc ^3(e+f x) (-11 a \sin (f x)-26 b \sin (f x)) \sec ^6(e+f x)}{120 (a+b)^4 f \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \csc (e) \csc (e+f x) \left (23 \sin (f x) a^2+106 b \sin (f x) a+173 b^2 \sin (f x)\right ) \sec ^6(e+f x)}{120 (a+b)^5 f \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b) \sec (2 e) \left (2 \sin (2 e) b^6+a \sin (2 e) b^5-a \sin (2 f x) b^5\right ) \sec ^6(e+f x)}{16 a^3 (a+b)^4 f \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(\cos (2 e+2 f x) a+a+2 b)^2 \sec (2 e) \left (-16 \sin (2 e) b^6-52 a \sin (2 e) b^5+6 a \sin (2 f x) b^5-21 a^2 \sin (2 e) b^4+21 a^2 \sin (2 f x) b^4\right ) \sec ^6(e+f x)}{64 a^3 (a+b)^5 f \left (b \sec ^2(e+f x)+a\right )^3}-\frac{(\cos (2 e+2 f x) a+a+2 b)^3 \cot (e) \csc ^4(e+f x) \sec ^6(e+f x)}{40 (a+b)^3 f \left (b \sec ^2(e+f x)+a\right )^3}-\frac{x (\cos (2 e+2 f x) a+a+2 b)^3 \sec ^6(e+f x)}{8 a^3 \left (b \sec ^2(e+f x)+a\right )^3}+\frac{(11 a \cos (e)+26 b \cos (e)) (\cos (2 e+2 f x) a+a+2 b)^3 \csc (e) \csc ^2(e+f x) \sec ^6(e+f x)}{120 (a+b)^4 f \left (b \sec ^2(e+f x)+a\right )^3} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-(x*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6)/(8*a^3*(a + b*Sec[e + f*x]^2)^3) + ((11*a*Cos[e] + 26*b*C
os[e])*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Csc[e]*Csc[e + f*x]^2*Sec[e + f*x]^6)/(120*(a + b)^4*f*(a + b*Sec[e +
f*x]^2)^3) - ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Cot[e]*Csc[e + f*x]^4*Sec[e + f*x]^6)/(40*(a + b)^3*f*(a + b*Se
c[e + f*x]^2)^3) + ((99*a^2 + 44*a*b + 8*b^2)*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*(-(b^4*ArcTan[Se
c[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*
e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(64*a^3*Sqrt[a + b]*f*Sqrt[b
*Cos[4*e] - I*b*Sin[4*e]]) + ((I/64)*b^4*ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*
e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2
*e + f*x])]*Sin[2*e])/(a^3*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]])))/((a + b)^5*(a + b*Sec[e + f*x]^2)^
3) + ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Csc[e]*Csc[e + f*x]^5*Sec[e + f*x]^6*Sin[f*x])/(40*(a + b)^3*f*(a + b*S
ec[e + f*x]^2)^3) + ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Csc[e]*Csc[e + f*x]^3*Sec[e + f*x]^6*(-11*a*Sin[f*x] - 2
6*b*Sin[f*x]))/(120*(a + b)^4*f*(a + b*Sec[e + f*x]^2)^3) + ((a + 2*b + a*Cos[2*e + 2*f*x])^3*Csc[e]*Csc[e + f
*x]*Sec[e + f*x]^6*(23*a^2*Sin[f*x] + 106*a*b*Sin[f*x] + 173*b^2*Sin[f*x]))/(120*(a + b)^5*f*(a + b*Sec[e + f*
x]^2)^3) + ((a + 2*b + a*Cos[2*e + 2*f*x])*Sec[2*e]*Sec[e + f*x]^6*(a*b^5*Sin[2*e] + 2*b^6*Sin[2*e] - a*b^5*Si
n[2*f*x]))/(16*a^3*(a + b)^4*f*(a + b*Sec[e + f*x]^2)^3) + ((a + 2*b + a*Cos[2*e + 2*f*x])^2*Sec[2*e]*Sec[e +
f*x]^6*(-21*a^2*b^4*Sin[2*e] - 52*a*b^5*Sin[2*e] - 16*b^6*Sin[2*e] + 21*a^2*b^4*Sin[2*f*x] + 6*a*b^5*Sin[2*f*x
]))/(64*a^3*(a + b)^5*f*(a + b*Sec[e + f*x]^2)^3)

________________________________________________________________________________________

Maple [A]  time = 0.131, size = 437, normalized size = 1.5 \begin{align*} -{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f{a}^{3}}}-{\frac{1}{5\,f \left ( a+b \right ) ^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{5}}}+{\frac{a}{3\,f \left ( a+b \right ) ^{4} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}+{\frac{4\,b}{3\,f \left ( a+b \right ) ^{4} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{{a}^{2}}{f \left ( a+b \right ) ^{5}\tan \left ( fx+e \right ) }}-5\,{\frac{ab}{f \left ( a+b \right ) ^{5}\tan \left ( fx+e \right ) }}-10\,{\frac{{b}^{2}}{f \left ( a+b \right ) ^{5}\tan \left ( fx+e \right ) }}+{\frac{19\,{b}^{5} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,fa \left ( a+b \right ) ^{5} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{{b}^{6} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{2\,f{a}^{2} \left ( a+b \right ) ^{5} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{21\,{b}^{4}\tan \left ( fx+e \right ) }{8\,f \left ( a+b \right ) ^{5} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{25\,{b}^{5}\tan \left ( fx+e \right ) }{8\,fa \left ( a+b \right ) ^{5} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{{b}^{6}\tan \left ( fx+e \right ) }{2\,f{a}^{2} \left ( a+b \right ) ^{5} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{99\,{b}^{4}}{8\,fa \left ( a+b \right ) ^{5}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{11\,{b}^{5}}{2\,f{a}^{2} \left ( a+b \right ) ^{5}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{{b}^{6}}{f{a}^{3} \left ( a+b \right ) ^{5}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x)

[Out]

-1/f/a^3*arctan(tan(f*x+e))-1/5/f/(a+b)^3/tan(f*x+e)^5+1/3/f/(a+b)^4/tan(f*x+e)^3*a+4/3/f/(a+b)^4/tan(f*x+e)^3
*b-1/f/(a+b)^5/tan(f*x+e)*a^2-5/f/(a+b)^5/tan(f*x+e)*a*b-10/f/(a+b)^5/tan(f*x+e)*b^2+19/8/f*b^5/a/(a+b)^5/(a+b
+b*tan(f*x+e)^2)^2*tan(f*x+e)^3+1/2/f*b^6/a^2/(a+b)^5/(a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)^3+21/8/f*b^4/(a+b)^5/(
a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)+25/8/f*b^5/a/(a+b)^5/(a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)+1/2/f*b^6/a^2/(a+b)^5/
(a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)+99/8/f*b^4/a/(a+b)^5/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))+11
/2/f*b^5/a^2/(a+b)^5/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))+1/f*b^6/a^3/(a+b)^5/((a+b)*b)^(1/2)*
arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.10918, size = 5045, normalized size = 17.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/480*(4*(184*a^7 + 848*a^6*b + 1384*a^5*b^2 + 315*a^3*b^4 + 90*a^2*b^5)*cos(f*x + e)^9 - 4*(280*a^7 + 1032*
a^6*b + 864*a^5*b^2 - 2768*a^4*b^3 + 945*a^3*b^4 - 15*a^2*b^5 - 60*a*b^6)*cos(f*x + e)^7 + 4*(120*a^7 + 40*a^6
*b - 1416*a^5*b^2 - 4272*a^4*b^3 + 2329*a^3*b^4 - 585*a^2*b^5 - 180*a*b^6)*cos(f*x + e)^5 + 20*(48*a^6*b + 184
*a^5*b^2 + 200*a^4*b^3 - 575*a^3*b^4 + 153*a^2*b^5 + 36*a*b^6)*cos(f*x + e)^3 - 15*((99*a^4*b^3 + 44*a^3*b^4 +
 8*a^2*b^5)*cos(f*x + e)^8 + 99*a^2*b^5 + 44*a*b^6 + 8*b^7 - 2*(99*a^4*b^3 - 55*a^3*b^4 - 36*a^2*b^5 - 8*a*b^6
)*cos(f*x + e)^6 + (99*a^4*b^3 - 352*a^3*b^4 - 69*a^2*b^5 + 12*a*b^6 + 8*b^7)*cos(f*x + e)^4 + 2*(99*a^3*b^4 -
 55*a^2*b^5 - 36*a*b^6 - 8*b^7)*cos(f*x + e)^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2
*(3*a*b + 4*b^2)*cos(f*x + e)^2 - 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2)*cos(f*x + e))*sqrt(-b/
(a + b))*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2))*sin(f*x + e) + 60*(8*a^5*b^2 +
 40*a^4*b^3 + 80*a^3*b^4 - 19*a^2*b^5 - 4*a*b^6)*cos(f*x + e) + 480*((a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3
+ 5*a^3*b^4 + a^2*b^5)*f*x*cos(f*x + e)^8 - 2*(a^7 + 4*a^6*b + 5*a^5*b^2 - 5*a^3*b^4 - 4*a^2*b^5 - a*b^6)*f*x*
cos(f*x + e)^6 + (a^7 + a^6*b - 9*a^5*b^2 - 25*a^4*b^3 - 25*a^3*b^4 - 9*a^2*b^5 + a*b^6 + b^7)*f*x*cos(f*x + e
)^4 + 2*(a^6*b + 4*a^5*b^2 + 5*a^4*b^3 - 5*a^2*b^5 - 4*a*b^6 - b^7)*f*x*cos(f*x + e)^2 + (a^5*b^2 + 5*a^4*b^3
+ 10*a^3*b^4 + 10*a^2*b^5 + 5*a*b^6 + b^7)*f*x)*sin(f*x + e))/(((a^10 + 5*a^9*b + 10*a^8*b^2 + 10*a^7*b^3 + 5*
a^6*b^4 + a^5*b^5)*f*cos(f*x + e)^8 - 2*(a^10 + 4*a^9*b + 5*a^8*b^2 - 5*a^6*b^4 - 4*a^5*b^5 - a^4*b^6)*f*cos(f
*x + e)^6 + (a^10 + a^9*b - 9*a^8*b^2 - 25*a^7*b^3 - 25*a^6*b^4 - 9*a^5*b^5 + a^4*b^6 + a^3*b^7)*f*cos(f*x + e
)^4 + 2*(a^9*b + 4*a^8*b^2 + 5*a^7*b^3 - 5*a^5*b^5 - 4*a^4*b^6 - a^3*b^7)*f*cos(f*x + e)^2 + (a^8*b^2 + 5*a^7*
b^3 + 10*a^6*b^4 + 10*a^5*b^5 + 5*a^4*b^6 + a^3*b^7)*f)*sin(f*x + e)), -1/240*(2*(184*a^7 + 848*a^6*b + 1384*a
^5*b^2 + 315*a^3*b^4 + 90*a^2*b^5)*cos(f*x + e)^9 - 2*(280*a^7 + 1032*a^6*b + 864*a^5*b^2 - 2768*a^4*b^3 + 945
*a^3*b^4 - 15*a^2*b^5 - 60*a*b^6)*cos(f*x + e)^7 + 2*(120*a^7 + 40*a^6*b - 1416*a^5*b^2 - 4272*a^4*b^3 + 2329*
a^3*b^4 - 585*a^2*b^5 - 180*a*b^6)*cos(f*x + e)^5 + 10*(48*a^6*b + 184*a^5*b^2 + 200*a^4*b^3 - 575*a^3*b^4 + 1
53*a^2*b^5 + 36*a*b^6)*cos(f*x + e)^3 + 15*((99*a^4*b^3 + 44*a^3*b^4 + 8*a^2*b^5)*cos(f*x + e)^8 + 99*a^2*b^5
+ 44*a*b^6 + 8*b^7 - 2*(99*a^4*b^3 - 55*a^3*b^4 - 36*a^2*b^5 - 8*a*b^6)*cos(f*x + e)^6 + (99*a^4*b^3 - 352*a^3
*b^4 - 69*a^2*b^5 + 12*a*b^6 + 8*b^7)*cos(f*x + e)^4 + 2*(99*a^3*b^4 - 55*a^2*b^5 - 36*a*b^6 - 8*b^7)*cos(f*x
+ e)^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f*x + e)*sin(f*x + e)
))*sin(f*x + e) + 30*(8*a^5*b^2 + 40*a^4*b^3 + 80*a^3*b^4 - 19*a^2*b^5 - 4*a*b^6)*cos(f*x + e) + 240*((a^7 + 5
*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*f*x*cos(f*x + e)^8 - 2*(a^7 + 4*a^6*b + 5*a^5*b^2 - 5*
a^3*b^4 - 4*a^2*b^5 - a*b^6)*f*x*cos(f*x + e)^6 + (a^7 + a^6*b - 9*a^5*b^2 - 25*a^4*b^3 - 25*a^3*b^4 - 9*a^2*b
^5 + a*b^6 + b^7)*f*x*cos(f*x + e)^4 + 2*(a^6*b + 4*a^5*b^2 + 5*a^4*b^3 - 5*a^2*b^5 - 4*a*b^6 - b^7)*f*x*cos(f
*x + e)^2 + (a^5*b^2 + 5*a^4*b^3 + 10*a^3*b^4 + 10*a^2*b^5 + 5*a*b^6 + b^7)*f*x)*sin(f*x + e))/(((a^10 + 5*a^9
*b + 10*a^8*b^2 + 10*a^7*b^3 + 5*a^6*b^4 + a^5*b^5)*f*cos(f*x + e)^8 - 2*(a^10 + 4*a^9*b + 5*a^8*b^2 - 5*a^6*b
^4 - 4*a^5*b^5 - a^4*b^6)*f*cos(f*x + e)^6 + (a^10 + a^9*b - 9*a^8*b^2 - 25*a^7*b^3 - 25*a^6*b^4 - 9*a^5*b^5 +
 a^4*b^6 + a^3*b^7)*f*cos(f*x + e)^4 + 2*(a^9*b + 4*a^8*b^2 + 5*a^7*b^3 - 5*a^5*b^5 - 4*a^4*b^6 - a^3*b^7)*f*c
os(f*x + e)^2 + (a^8*b^2 + 5*a^7*b^3 + 10*a^6*b^4 + 10*a^5*b^5 + 5*a^4*b^6 + a^3*b^7)*f)*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**6/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.64043, size = 545, normalized size = 1.91 \begin{align*} \frac{\frac{15 \,{\left (99 \, a^{2} b^{4} + 44 \, a b^{5} + 8 \, b^{6}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )}}{{\left (a^{8} + 5 \, a^{7} b + 10 \, a^{6} b^{2} + 10 \, a^{5} b^{3} + 5 \, a^{4} b^{4} + a^{3} b^{5}\right )} \sqrt{a b + b^{2}}} + \frac{15 \,{\left (19 \, a b^{5} \tan \left (f x + e\right )^{3} + 4 \, b^{6} \tan \left (f x + e\right )^{3} + 21 \, a^{2} b^{4} \tan \left (f x + e\right ) + 25 \, a b^{5} \tan \left (f x + e\right ) + 4 \, b^{6} \tan \left (f x + e\right )\right )}}{{\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2} + 10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5}\right )}{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2}} - \frac{120 \,{\left (f x + e\right )}}{a^{3}} - \frac{8 \,{\left (15 \, a^{2} \tan \left (f x + e\right )^{4} + 75 \, a b \tan \left (f x + e\right )^{4} + 150 \, b^{2} \tan \left (f x + e\right )^{4} - 5 \, a^{2} \tan \left (f x + e\right )^{2} - 25 \, a b \tan \left (f x + e\right )^{2} - 20 \, b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}\right )}}{{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \tan \left (f x + e\right )^{5}}}{120 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

1/120*(15*(99*a^2*b^4 + 44*a*b^5 + 8*b^6)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*
b + b^2)))/((a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5*a^4*b^4 + a^3*b^5)*sqrt(a*b + b^2)) + 15*(19*a*b^5*ta
n(f*x + e)^3 + 4*b^6*tan(f*x + e)^3 + 21*a^2*b^4*tan(f*x + e) + 25*a*b^5*tan(f*x + e) + 4*b^6*tan(f*x + e))/((
a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*(b*tan(f*x + e)^2 + a + b)^2) - 120*(f*x + e)/a
^3 - 8*(15*a^2*tan(f*x + e)^4 + 75*a*b*tan(f*x + e)^4 + 150*b^2*tan(f*x + e)^4 - 5*a^2*tan(f*x + e)^2 - 25*a*b
*tan(f*x + e)^2 - 20*b^2*tan(f*x + e)^2 + 3*a^2 + 6*a*b + 3*b^2)/((a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5
*a*b^4 + b^5)*tan(f*x + e)^5))/f